#!/bin/bash

set -e

cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1

export readonly ARCH=${1:-amd64}
export readonly NAME=${2:-$(basename "${PWD%/*}")}
export readonly VERSION=${3:-$(basename "$PWD")}


cat <<'EOF' >"Kubefile"
FROM scratch
COPY opt opt
COPY manifests manifests
COPY configs configs
COPY scripts scripts
COPY entrypoint.sh engrypoint.sh
CMD ["bash entrypoint.sh"]
EOF
